import request from '@/plugin/axios'

const api = {
    getIndexDetail:`/daily/getIndexDetail`,
    getNewChatDetail:`/daily/getNewChatDetail`,

    getRoles: `/admin/getRoles`,
    changeOneAdmin: `/admin/changeOneAdmin`,
    getAdminList: `/admin/getAdminList`,
    deleteOneAdmin: `/admin/deleteOneAdmin`,
    getOneAdmin: `/admin/getOneAdmin`,

    getOneUser: `/user/getOneUser`,
    getOneChat: `/user/getOneChat`,
}

export function getIndexDetail(params){
    return request({
        url:api.getIndexDetail,
        method:'post',
        data:params
    })
}

export function getRoles(params) {
    return request({
        url: api.getRoles,
        method: 'post',
        data: params
    })
}

export function changeOneAdmin(params) {
    return request({
        url: api.changeOneAdmin,
        method: 'post',
        data: params
    })
}

export function getAdminList(params) {
    return request({
        url: api.getAdminList,
        method: 'post',
        data: params
    })
}


export function deleteOneAdmin(params) {
    return request({
        url: api.deleteOneAdmin,
        method: 'post',
        data: params
    })
}

export function getOneAdmin(params) {
    return request({
        url: api.getOneAdmin,
        method: 'post',
        data: params
    })
}

export function getOneUser(params) {
    return request({
        url: api.getOneUser,
        method: 'post',
        data: params
    })
}

export function getNewChatDetail(params) {
    return request({
        url: api.getNewChatDetail,
        method: 'post',
        data: params
    })
}

export function getOneChat(params) {
    return request({
        url: api.getOneChat,
        method: 'post',
        data: params
    })
}
